package com.yuqing.myblogServe.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;

/**
 * @author lyq
 * @date 2023/12/9
 **/
@Data
public class ArticleComment {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 文章id
     */
    private String articleId;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 评论内容
     */
    @NotEmpty(message = "评论内容不能为空")
    private String commentContent;

    /**
     * 评论数量
     */
    private Integer replyCount = 0;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;
}
